package cn.zwz.insurance.entity;

import cn.hutool.core.util.IdUtil;
import cn.zwz.basics.baseClass.ZwzBaseEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
import java.util.zip.ZipEntry;

/**
 * @author jsx on 2023/4/9
 *
 * 流水类
 **/
@Data
@Table(name="a_flow")
@TableName("a_flow")
public class Flow{

    @ApiModelProperty("主键")
    @Id
    @TableId
    private String id = IdUtil.getSnowflake(1, 1).nextId() + "";;

    @ApiModelProperty("参保人员")
    private String rosterId;

    @ApiModelProperty("增加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @CreatedDate
    private Date createTime;

    @ApiModelProperty("来源")
    private String remark;

    @ApiModelProperty("金钱")
    private BigDecimal money;

    @ApiModelProperty("收入/支付")
    private String status;

}
